//
//  customCell.m
//  Feeds2
//
//  Created by cos on 2020/11/25.
//  Copyright © 2020 cos. All rights reserved.
//

#import "customCell.h"

@implementation customCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
   self = [super initWithStyle:style        reuseIdentifier:reuseIdentifier];

   if (self) {
       
       UIImage *likeImg = [UIImage imageNamed:@"like.png"];
       UIImage *commentImg = [UIImage imageNamed:@"comment.png"];
       UIImageView *cimg = [[UIImageView alloc] initWithImage:commentImg];
       UIImageView *limg = [[UIImageView alloc] initWithImage:likeImg];
       cimg.frame = CGRectMake(10, 70, self.frame.size.height/3, self.frame.size.height/3);
       limg.frame = CGRectMake(40, 70, self.frame.size.height/3, self.frame.size.height/3);
       [self.contentView addSubview:cimg];
       [self.contentView addSubview:limg];
       [self.contentView addSubview:title];
       title = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, self.frame.size.width, self.frame.size.height/2)];
       title.font = [UIFont systemFontOfSize: 22.0f];
       [self.contentView addSubview:title];
       commentNum = [[UILabel alloc] initWithFrame:CGRectMake(27, 70, 100, self.frame.size.height/3)];
       commentNum.font = [UIFont systemFontOfSize: 14.0f];
       [self.contentView addSubview:commentNum];
       likeNum = [[UILabel alloc] initWithFrame:CGRectMake(55, 70, 100, self.frame.size.height/3)];
       likeNum.font = [UIFont systemFontOfSize: 14.0f];
       [self.contentView addSubview:likeNum];
   }
   return self;
}

- (void)setLabel1Text:(NSString *)text1
           label2Text:(NSString *)text2
           label3Text:(NSString *)text3{
        title.text = text1;
        commentNum.text = text2;
        likeNum.text = text3;
}
@end
